package com.ly.dingtalk.constant;


import lombok.Data;

/**
 * 钉钉系统常量
 *
 * @author wangzhen
 */
@Data
public class DingUrlConstant {

    // 钉钉互动卡片注册回调地址和路由键
    public static final String REGISTER_CALLBACK = "https://oapi.dingtalk.com/topapi/im/chat/scencegroup/interactivecard/callback/register";

    @Deprecated
    public static final String LOGIN_WITH_ACCOUNT = "https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=APPID&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=REDIRECT_URI";

    @Deprecated
    public static final String LOGIN_WITH_SCAN = "https://oapi.dingtalk.com/connect/qrconnect?appid=APPID&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=REDIRECT_URI";

    @Deprecated
    public static final String LOGIN_WITHOUT_OP = "https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=APPID&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=REDIRECT_URI";

    public static final class WorkNotify {
        // ("发送工作通知") https://open.dingtalk.com/document/orgapp/work-notice-option
        public static final String SEND_WORK_NOTIFY = "https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2";
        // ("获取工作通知发送进度")
        public static final String GET_WORK_NOTIFY_PROGRESS = "https://oapi.dingtalk.com/topapi/message/corpconversation/getsendprogress";
        // ("获取工作通知发送结果")
        public static final String GET_WORK_NOTIFY_RESULT = "https://oapi.dingtalk.com/topapi/message/corpconversation/getsendresult";
        // ("更新工作通知(主要是OA)")
        public static final String UPDATE_WORK_NOTIFY = "https://oapi.dingtalk.com/topapi/message/corpconversation/status_bar/update";
    }

    public static final class AccessToken {
        // ("旧版SDK 获取企业内部应用的access_token")
        public static final String ACCESS_TOKEN_OLD = "https://oapi.dingtalk.com/gettoken";
    }

    public static final class User {
        // ("根据用户手机号获取企业内钉钉userId")
        public static final String GET_USERID_BY_MOBILE = "https://oapi.dingtalk.com/topapi/v2/user/getbymobile";
        // ("根据扫码后回调code获取用户信息")
        public static final String GET_USER_INFO_BY_CODE = "https://oapi.dingtalk.com/sns/getuserinfo_bycode";
        // ("根据钉钉unionId获取userId")
        public static final String GET_USER_ID_BY_UNION_ID = "https://oapi.dingtalk.com/topapi/user/getbyunionid";
        // ("根据钉钉userId获取user")
        public static final String GET_USER_BY_USER_ID = "https://oapi.dingtalk.com/topapi/v2/user/get";
        // ("通过免登码获取用户信息旧版SDK")
        public static final String GET_USER_BY_LOGIN_AUTH_CODE = "https://oapi.dingtalk.com/topapi/v2/user/getuserinfo";
        // ("获取部门用户基础信息,只支持获取员工的userId和name两个字段信息")
        public static final String GET_USER_BASE_INFO_IN_DEPT = "https://oapi.dingtalk.com/topapi/user/listsimple";
    }
    
    public static final class UserV2 {
        // ("根据钉钉userId获取user")
        public static final String GET_USER_BY_USER_ID = "https://oapi.dingtalk.com/topapi/v2/user/get";
        // ("创建用户")
        public static final String CREATE_USER = "https://oapi.dingtalk.com/topapi/v2/user/create";
        // ("更新用户信息")
        public static final String UPDATE_USER = "https://oapi.dingtalk.com/topapi/v2/user/update";
        // ("删除")
        public static final String DELETE_USER = "https://oapi.dingtalk.com/topapi/v2/user/delete";
        // ("获取部门用户基础信息")
        public static final String LISTS_IMPLE = "https://oapi.dingtalk.com/topapi/user/listsimple";
        // ("获取部门用户userid列表")
        public static final String LIST_ID = "https://oapi.dingtalk.com/topapi/user/listid";
        // ("获取部门用户详情")
        public static final String LIST = "https://oapi.dingtalk.com/topapi/v2/user/list";
        // ("获取员工人数")
        public static final String COUNT = "https://oapi.dingtalk.com/topapi/user/count";
        // ("获取未登录钉钉的员工列表")
        public static final String GET_INACTIVE = "https://oapi.dingtalk.com/topapi/inactive/user/v2/get";
        // ("根据手机号查询企业账号用户")
        public static final String GET_BY_MOBILE = "https://oapi.dingtalk.com/topapi/v2/user/getbymobile";
        // ("根据unionid获取用户userid")
        public static final String GET_BY_UNIONID = "https://oapi.dingtalk.com/topapi/user/getbyunionid";
        // ("获取管理员列表")
        public static final String LIST_ADMIN = "https://oapi.dingtalk.com/topapi/user/listadmin";
        // ("获取管理员通讯录权限范围")
        public static final String GET_ADMIN_SCOPE = "https://oapi.dingtalk.com/topapi/user/get_admin_scope";
        
    }

    public static final class Department {
        // ("获取部门详情")
        public static final String GET_DEPT_DETAIL = "https://oapi.dingtalk.com/topapi/v2/department/get";
        // ("获取子部门列表")
        public static final String GET_SUB_DEPT_LIST = "https://oapi.dingtalk.com/topapi/v2/department/listsub";
        // ("获取子部门id列表")
        public static final String GET_SUB_DEPT_ID_LIST = "https://oapi.dingtalk.com/topapi/v2/department/listsubid";
        // ("获取指定部门的所有父部门列表")
        public static final String GET_PARENT_DEPT_LIST_BY_DEPT_ID = "https://oapi.dingtalk.com/topapi/v2/department/listparentbydept";
        // ("获取指定用户的所有父部门列表")
        public static final String GET_PARENT_DEPT_LIST_BY_USER_ID = "https://oapi.dingtalk.com/topapi/v2/department/listparentbyuser";
    }

    public static final class ExternalContact {
        // ("获取外部联系人")
        public static final String GET_EXTCONTACT_INFO = "https://oapi.dingtalk.com/topapi/extcontact/get";
        // ("添加外部联系人")
        public static final String ADD_EXTCONTACT = "https://oapi.dingtalk.com/topapi/extcontact/create";
        // ("删除外部联系人")
        public static final String DELETE_EXTCONTACT = "https://oapi.dingtalk.com/topapi/extcontact/delete";
        // ("更新外部联系人")
        public static final String UPDATE_EXTCONTACT = "https://oapi.dingtalk.com/topapi/extcontact/update";
        // ("获取外部联系人列表")
        public static final String GET_EXTCONTACTS = "https://oapi.dingtalk.com/topapi/extcontact/list";
        // ("获取外部联系人标签列表")
        public static final String GET_EXTCONTACT_TAGS = "https://oapi.dingtalk.com/topapi/extcontact/listlabelgroups";
    }

    public static final class Role {
        // ("角色列表")
        public static final String GET_ROLE_LIST = "https://oapi.dingtalk.com/topapi/role/list";
        // ("根据角色id获取用户列表")
        public static final String GET_USERS_BY_ROLE_ID = "https://oapi.dingtalk.com/topapi/role/simplelist";
        // 创建角色
        public static final String ADD_ROLE = "https://oapi.dingtalk.com/role/add_role";
        // 创建角色组
        public static final String ADD_ROLE_GROUP = "https://oapi.dingtalk.com/role/add_role_group";
        // 更新角色名称
        public static final String UPDATE_ROLE = "https://oapi.dingtalk.com/role/update_role";
        // 批量增加员工角色
        public static final String ADD_ROLESFOREMPS = "https://oapi.dingtalk.com/topapi/role/addrolesforemps";
        // 删除角色
        public static final String DELETE_ROLE = "https://oapi.dingtalk.com/topapi/role/deleterole";
        // 批量删除员工角色
        public static final String REMOVE_ROLESFOREMPS = "https://oapi.dingtalk.com/topapi/role/removerolesforemps";
        // 设定角色成员管理范围
        public static final String UPDATE = "https://oapi.dingtalk.com/topapi/role/scope/update";
        // 获取角色组列表
        public static final String GET_ROLE_GROUP = "https://oapi.dingtalk.com/topapi/role/getrolegroup";
        // 获取角色列表
        public static final String ROLE_LIST = "https://oapi.dingtalk.com/topapi/role/list";
        // 获取角色详情
        public static final String GET_ROLE = "https://oapi.dingtalk.com/topapi/role/getrole";
        // 获取指定角色的员工列表
        public static final String SIMPLE_LIST = "https://oapi.dingtalk.com/topapi/role/simplelist";
    }

    public static final class OA {
        // 创建审批实例
        public static final String CREATE_PROCESS_INSTANCE = "https://oapi.dingtalk.com/topapi/processinstance/create";
        // ("获取企业内,用户可管理的所有审批模版")
        public static final String GET_MANAGEABLE_PROCESS_TEMPLATE_IN_CORP_LIST = "https://oapi.dingtalk.com/topapi/process/template/manage/get";
        // ("根据审批模版名称获取模版编号")
        public static final String GET_PROCESS_TEMPLATE_CODE_BY_NAME = "https://oapi.dingtalk.com/topapi/process/get_by_name";
        // ("根据审批模版编号获取审批实例id列表")
        public static final String GET_PROCESS_INSTANCE_IDS = "https://oapi.dingtalk.com/topapi/processinstance/listids";
        // ("获取审批实例信息")
        public static final String GET_PROCESS_INSTANCE = "https://oapi.dingtalk.com/topapi/processinstance/get";
    }
    
    public static final class CHAT {
        // 创建群聊
        public static final String CREATE_CHAT = "https://oapi.dingtalk.com/chat/create";
        // 更新群
        public static final String UPDATE_CHAT = "https://oapi.dingtalk.com/chat/update";
        // 查询群消息
        public static final String GET_CHAT_BY_ID = "https://oapi.dingtalk.com/chat/get";
    }

    // 获取群会话
    public static final String GET_CHAT_INFO = "https://oapi.dingtalk.com/chat/get";

    // media文件上传
    public static final String MEDIA_UPLOAD = "https://oapi.dingtalk.com/media/upload";

}
